<script setup>
import FatherComp from './components/FatherComp.vue';
import { ref, provide } from 'vue';
const money = ref(100)
const changeMoney = () => {
  money.value += 1000
}

//传递数据
provide('money', money)
provide('changeMoney', changeMoney)
</script>

<template>
  <div class="app-page" style="border: 10px solid #ccc; padding: 50px; width: 600px">
    app 组件---{{ money }}
    <FatherComp />
  </div>
</template>

<style scoped></style>